<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>step3</title>
    <style>
        .panelform{
            width:80%;
            height: 460px;
            margin: 0 auto;
        }
        .form-control {
            height: 35px;
        }
        .form-control-feedback{
            right: 25px;
        }

        .glyphicon-ok{
            color:green;
        }
        .glyphicon-remove{
            color:#A94442;
        }
        .seed{
            margin: 0 auto ;
        }
        .modal-header{
            background-color: #fff;
        }

        .leftbtn{
            margin-top: 10px;
            float: left;
        }
    </style>
</head>
<body>
<div  class="panelform">
    <div class="container-fluid" >
        <div class="row-fluid">
            <div class="span12">
                <div class="tab-pane active"  >
                    <a role="addelement"  data-trigger="modal" href="/crawl/element/addElement"   data-cssclass="seed modal-header" data-top="10%" data-width="80%" data-height=620 data-title="抓取目标设定" class="btn btn-success leftbtn">新增</a>
                    <table id="tb_element"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="/static/crawl/step/step3-element.js"></script>
<script type="text/javascript">
    var elementid = "" ; /*this is a half-global-var ,  for deliver params between different html pages  */

    $(function(){
        var modal = $.scojs_modal({
            keyboard: true
        });
        modal.show();
        modal.close();
        var oTableElement = new TableElement();
        oTableElement.Init();
    });

    $("a[role='addelement']").scojs_modal({
        onClose: function(){
            $("#tb_element").bootstrapTable('refresh');
            elementid = "" ;
        }
    });
</script>
</body>
</html>